﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLLMisIdeas;

namespace MisIdeas.Ideas
{
    public partial class VerIdea : System.Web.UI.Page
    {
        public int IdeaID
        {
            get
            {
                int id = 0;

                if (Request.QueryString["ID"] != null)
                    id = int.Parse(Request.QueryString["ID"]);

                return id;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                MI_Idea idea = new BLLIdeas().TraerIdea(IdeaID);
                lblNombre.Text = idea.MI_Nombre;
                lblObjetivos.Text = idea.MI_Objetivos;
            }
        }

        protected void btnNuevoDetalle_Click(object sender, EventArgs e)
        {
            Response.Redirect("VerDetalle.aspx?IdeaID=" + IdeaID);
        }
    }
}